package com.sangeng.controller;

import com.sangeng.dto.ArticleDto;
import com.sangeng.entity.ResponseResult;
import com.sangeng.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/content")
public class WriteBlogController {
    @Autowired
    ArticleService articleService;
    @PostMapping("/article")
    public ResponseResult writeBlog(@RequestBody ArticleDto articleDto){


     return articleService.addBlog(articleDto);




    }
}
